package com.syni.mdd.sjb.common.datatreaure.controller.protect.sms;

import com.syni.mdd.sjb.common.component.utils.common.annotations.CheckUserIdentity;
import com.syni.mdd.sjb.common.datatreaure.entity.vo.rq.BaseRqVo;
import com.syni.mdd.sjb.common.datatreaure.entity.vo.rq.userChannel.SwitchChannelSmsNoticeVo;
import com.syni.mdd.sjb.common.datatreaure.service.DxshAppSmsServiceService;
import com.syni.mdd.sjb.common.datatreaure.service.DxshAppUserChannelService;
import com.syni.mdd.sjb.common.datatreaure.service.DxshAppUserSmsService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 短信通知页
 */
@RestController
@RequestMapping("sms")
public class SmsController {
    @Autowired
    DxshAppUserSmsService dxshAppUserSmsService;
    @Autowired
    DxshAppSmsServiceService dxshAppSmsServiceService;
    @Autowired
    DxshAppUserChannelService dxshAppUserChannelService;

    @PostMapping("data")
    @ApiOperation(value = "获取用户短信数据")
    @CheckUserIdentity
    public Map<String,Object> data(@RequestBody BaseRqVo baseRqVo){
        return dxshAppUserSmsService.data(baseRqVo);
    }

    @PostMapping("switchChannelSmsNotice")
    @ApiOperation(value = "开/关渠道的短信通知")
    @CheckUserIdentity
    public Map<String,Object> switchChannelSmsNotice(@RequestBody @Validated SwitchChannelSmsNoticeVo switchChannelSmsNoticeVo){
        return dxshAppUserSmsService.switchChannelSmsNotice(switchChannelSmsNoticeVo);
    }

//    @PostMapping("switchUserSmsNotice")
//    @ApiOperation(value = "开/关用户的总短信通知")
//    @CheckUserIdentity
//    public Map<String,Object> switchUserSmsNotice(@RequestBody BaseRqVo baseRqVo){
//        return dxshAppUserSmsService.switchUserSmsNotice(baseRqVo);
//    }

}
